package cn.leshua.config;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * Description:
 * Author:Geno
 * Date:2018/5/24
 * Mail:geno@yeahka.com
 */
public class MerchantConfig {
    public static String AGENT_ID;//代理商编号
    public static String KEY;//私钥
    public static String VERSION;//版本号
    public static String CHARSET;//字符编码
//    public static String REQ_SERIAL_NO = UUID.randomUUID().toString();//请求流水号，可自定义

    public static String REGISTER_URL;//商户进件
    public static String OPEN_URL;//商户开通业务
    public static String UPDATE_URL;//商户信息修改
    public static String GET_URL;//查询商户信息
    public static String AUDIT_QUERY_RUL;//审核状态查询
    public static String WX_CONFIG_URL;//微信支付参数配置
    public static String WX_CONFIG_QRY_URL;//微信支付参数配置查询
    public static String PIC_UPLOAD_RUL;//图片上传

    public static String DOWNLOAD_URL;


    static {
        Properties prop = new Properties();
        InputStream in = LeshuaConfig.class.getResourceAsStream("/config.properties");
        try {
            prop.load(in);
            AGENT_ID = prop.getProperty("AGENT_ID").trim();
            KEY = prop.getProperty("KEY").trim();
            VERSION = prop.getProperty("VERSION").trim();
            CHARSET = prop.getProperty("CHARSET").trim();

            REGISTER_URL = prop.getProperty("REGISTER_URL").trim();
            OPEN_URL = prop.getProperty("OPEN_URL").trim();
            UPDATE_URL = prop.getProperty("UPDATE_URL").trim();
            GET_URL = prop.getProperty("GET_URL").trim();
//            AUDIT_QUERY_RUL = prop.getProperty("AUDIT_QUERY_RUL").trim();
//            WX_CONFIG_URL = prop.getProperty("WX_CONFIG_URL").trim();
//            WX_CONFIG_QRY_URL = prop.getProperty("WX_CONFIG_QRY_URL").trim();
//            PIC_UPLOAD_RUL = prop.getProperty("PIC_UPLOAD_RUL").trim();
            DOWNLOAD_URL = prop.getProperty("DOWNLOAD_URL").trim();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
